#include "LijolJoystick.h"

#include "LijolJoystickManager.h"

#include <stdio.h>
#include <string>

int main( int argc, char** argv )
{
	Lijol::JoystickManager manager( "/dev/input/js", 5 ); 
	while (1)
	{
		manager.update();
        printf(".\n");
        usleep(1000000);
	}
	
	/*
	std::string device = "/dev/input/js0";
	if ( argc>1 )
		device = argv[1];

	printf("joystick '%s'\n", device.c_str() );
	Lijol::Joystick joystick( device.c_str() );
	while (1)
	{
		joystick.update();
        printf("%s\n", joystick.toString().c_str());
        usleep(1000); //500000);
	}*/
	return 0;
}
